package com.Test;

import net.sf.json.JSONObject;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;


/**
 * Created by Administrator on 2016/4/15.
 */
@WebServlet(name = "appServlet")
public class appServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            response.setCharacterEncoding("UTF-8");
            request.setCharacterEncoding("UTF-8");
            response.setContentType("text/html");
            String temp = request.getParameter("temp");
            String oxy  = request.getParameter("oxy");
            PrintWriter out = response.getWriter();
            out.println("temp:"+temp+"oxy:"+oxy);
            JSONObject jsonObject = new JSONObject();
    }
}
